import Vue from 'vue'
import VueRouter from 'vue-router';
import App from './App.vue'
import router from './router'
import store from './store'
import 'normalize.css/normalize.css'
import './assets/css/reset.less'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'vue-area-linkage/dist/index.css'; // v2 or higher
import VueAreaLinkage from 'vue-area-linkage';
import VueClipboard  from 'vue-clipboard2'

Vue.use(VueAreaLinkage)
Vue.use(ElementUI)
Vue.use(VueClipboard)

Vue.config.productionTip = false

const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

router.beforeEach((to, from, next) => {
  document.body.scrollIntoView()
  next()
})




new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
